package com.lyf.scm.plan.api.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lyf.scm.common.model.SalesPlanSelectDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 需求计划DTO
 *
 * @author wangchlei
 * @date 2020/10/26
 */
@Data
@ApiModel("需求计划DTO")
public class RequirementPlanDTO {
    /**
     * 前端高级搜索传递条件
     */
    @ApiModelProperty("商品code集合")
    private List<SalesPlanSelectDTO> categoryCodeList;

    @ApiModelProperty("区域code集合")
    private List<SalesPlanSelectDTO> areaCodeList;

    @ApiModelProperty("父渠道code集合")
    private List<String> fatherChannelCodeList;

    @ApiModelProperty("仓库code集合")
    private List<String> warehouseCodeList;

    @ApiModelProperty("商品分层code集合")
    private List<String> layeredCodeList;
    /**
     * 其它搜索条件
     */
    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "开始时间不能为空")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    /**
     * 解析高级搜索条件后的汇总信息
     */
    @ApiModelProperty("大品类code集合")
    private List<String> priCategoryCodeList;

    @ApiModelProperty("中品类code集合")
    private List<String> secCategoryCodeList;

    @ApiModelProperty("小品类code集合")
    private List<String> terCategoryCodeList;

    @ApiModelProperty("商品code集合")
    private List<String> skuCodeList;

    @ApiModelProperty("省份code集合")
    private List<String> provinceCodeList;

    @ApiModelProperty("城市code集合")
    private List<String> cityCodeList;

    @ApiModelProperty("区/县code集合")
    private List<String> countyCodeList;

    @ApiModelProperty("门店code集合")
    private List<String> storeCodeList;
    /**
     * 业务追加条件
     */
    @ApiModelProperty("创建人")
    private Long creator;
    /**
     * 额外条件
     */
    @ApiModelProperty("起始日期")
    private String startDateStr;

    @ApiModelProperty("最后的起始日期日期")
    private String lastOfStartDateStr;

    @ApiModelProperty("起始日期")
    private Date startDate;

    @ApiModelProperty("最后的截止日期")
    private Date endDate;

    @ApiModelProperty("赋值十四周起始日期（Long类型）")
    private List<Long> dateListOfLong;

    @ApiModelProperty("当前日期（Long类型）")
    private Long thisDayOfLong;

    @ApiModelProperty("赋值十四周起始日期（Date类型）")
    private List<Date> dateList;
    /**
     * 条件存在与否
     */
    @ApiModelProperty("是否含大品类")
    private Boolean existPriCate;

    @ApiModelProperty("是否含中品类")
    private Boolean existSecCate;

    @ApiModelProperty("是否含小品类")
    private Boolean existTerCate;

    @ApiModelProperty("是否含sku")
    private Boolean existSkuCate;

    @ApiModelProperty("是否含渠道")
    private Boolean existChannel;

    @ApiModelProperty("是否含省")
    private Boolean existPro;

    @ApiModelProperty("是否含市")
    private Boolean existCity;

    @ApiModelProperty("是否含区")
    private Boolean existCount;

    @ApiModelProperty("是否含门店")
    private Boolean existStore;

    /**
     * 分页信息
     */
    @ApiModelProperty(value = "当前页码")
    private Integer pageNum;

    @ApiModelProperty(value = "每页记录数")
    private Integer pageSize;

    /**
     * --------------------导出--------------------
     */
    @ApiModelProperty("日期集合(周)")
    private List<Map<String, Date>> weekDateList;
}
